package com.easybuy.web.controller;

import com.easybuy.bean.EasybuyProduct;
import com.easybuy.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/product")
public class EasybuyProductController {

    @Autowired
    IProductService productService;
    @RequestMapping("/detail")
    public String derail(Model model,Integer epId){

        EasybuyProduct easybuyProduct=productService.detail(epId);
        model.addAttribute("easybuyProduct" ,easybuyProduct);
        return "product-view";
    }

}
